package com.aldd.service.impl;

import com.aldd.dao.FoodDao;
import com.aldd.entity.Food;
import com.aldd.service.FoodService;
import lombok.Data;

@Data
public class FoodServiceImpl implements FoodService {
    private FoodDao foodDao;

    @Override
    public Food getFoodById(int id) {
        Food food = foodDao.selectFoodById(id);
        food.setFoodName("薯条");
        return food;
    }

    @Override
    public Boolean addFood(Food food) {
        int i = foodDao.insertFood(food);
        return i > 0;
    }
}
